<?php


namespace app\badmin\controller;


use app\badmin\model\SystemLog as SystemLogModel;
use app\common\controller\BadminController;
use think\Exception;

/**
 * 系统日志
 * Class SystemLog
 * @package app\admin\controller
 */
class SystemLog  extends BadminController {

    protected $levelConfig = [
        1 => ['getlist'],
        2 => [],
        4 => [],
        8 => []
    ];

    /**
     * 列表
     * @return false|string
     * @throws \MongoDB\Driver\Exception\Exception
     */
    public function getList(){
        try {
            $params = $this->checkParams('page,long');
            if ($params === false) return $this->resErr();
            $list = SystemLogModel::getList($params);
            return $this->resData('success', $list);
        } catch (Exception $e) {
            return $this->resErr($e->getMessage(), $e->getCode());
        }
    }



}